<template>
  <view>
    <uni-easyinput type="textarea" autoHeight v-model="feekbackContent" placeholder="请输入内容"></uni-easyinput>
    <button size="mini" type="primary" class="mini-btn" @click="submit">提交</button>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import UniEasyinput from '@dcloudio/uni-ui/lib/uni-easyinput/uni-easyinput.vue'
import { postFeekbackAPI } from '@/services/home'
const feekbackContent = ref<string>('')
// 提交反馈
const submit = async () => {
  let params_data = { content: feekbackContent.value }
  const res = await postFeekbackAPI(params_data)
  console.log('所有错题id', res)
  if (res.code == 200) {
    console.log('反馈提交成功！')
    uni.showToast({ icon: 'success', title: '反馈提交成功！' })
  } else {
    uni.showToast({ icon: 'error', title: '反馈提交失败！' })
  }
}
</script>

<style lang="scss"></style>